﻿<Window x:Class="RL.wPerson"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Сотрудники" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="289" Width="799" xmlns:my="clr-namespace:RL" Loaded="Window_Loaded" Closing="Window_Closing">
    <Window.Resources>
        <CollectionViewSource x:Key="personViewSource" d:DesignSource="{d:DesignInstance my:person, CreateList=True}" />
    </Window.Resources>
    <Grid DataContext="{StaticResource personViewSource}">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Height="Auto" HorizontalAlignment="Stretch" Margin="0" Name="stackPanel2" VerticalAlignment="Stretch" Width="Auto" Orientation="Horizontal">
            <Button Content="Редактировать" Height="23" Name="buttonEdit" Width="112" Click="buttonEdit_Click" />
        </StackPanel>
        <StackPanel Grid.Row="2" Height="Auto" HorizontalAlignment="Stretch" Margin="0" Name="stackPanel1" VerticalAlignment="Stretch" Width="Auto" Orientation="Horizontal">
            <Button Content="Сохранить" Height="23" Name="buttonSave" Width="75" Click="buttonSave_Click" />
        </StackPanel>
        <DataGrid AutoGenerateColumns="False" EnableRowVirtualization="True" Grid.RowSpan="1" Height="Auto" HorizontalAlignment="Stretch" ItemsSource="{Binding}" Margin="0" Name="personDataGrid" RowDetailsVisibilityMode="VisibleWhenSelected" VerticalAlignment="Stretch" Width="Auto" Grid.Row="1">
            <DataGrid.Columns>
                <DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=id}" Header="Код" Width="*" />
                <DataGridTextColumn x:Name="tabelColumn" Binding="{Binding Path=tabel}" Header="Табельный" Width="2*" />
                <DataGridTextColumn x:Name="fioColumn" Binding="{Binding Path=fio}" Header="Ф.И.О." Width="10*" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>
